<script setup lang="ts">
import {onMounted, reactive} from "vue";
import TsSample from "@/components/ts-sample/index.vue";
import {useStore} from "./store";

const store = useStore();

const orgin = reactive({
  msg: "父组件msg"
})


const onUpdate = (data:any) => {
  console.log(data);
};
const onDelete = (data:any) => {
  console.log(data);

};


store.commit('SET_USERNAME', '李四');

console.log(store.state.username);



</script>

<template>
  <!--<TsSample  @on-update="onUpdate" @on-delete="onDelete"></TsSample>-->
  <router-view></router-view>
</template>





<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
